import java.util.*;

/**
 * Created by User on 01.02.14.
 */
public class ShifrManager {
    public static List<String> shifr(List<String> in) {
        Iterator<String> iter = in.iterator();
        List<String> outList = new ArrayList<String>();
        String tmp;
        while (iter.hasNext()) {
            tmp = iter.next();
            outList.add(stringShifr(tmp, 3));

        }
        return outList;
    }

    public static List<String> ShifrList() {
        return shifr(stringGeneration());
    }

    public static String stringShifr(String s, int key) {
String tmp = "";
        char c;
        for (int i = 0; i < s.length() - 1; i++) {
            c = s.charAt(i);
            c = (char) (c + key);
            tmp += c;
        }
        return tmp;
    }

    public static List<String> stringGeneration() {
        Random generator = new Random(new Date().getTime());
        Random rand = new Random();
        List<String> randomStringList = new ArrayList<String>();
        char c = 'a';
        char v;
        for (int i = 0; i < 100000; i++) {
            String s = "";
            for (int j = 0; j < 10; j++) {
                v = (char) (c + generator.nextInt(15));
                s += v;
            }
            randomStringList.add(s);
        }
        return randomStringList;
    }
}
